# 获取各国疫情数据
# 导入模块
import requests
from bs4 import BeautifulSoup

# 发送请求
response = requests.get('http://ncov.dxy.cn/ncovh5/view/pneumonia')
home_page = response.content.decode()  # 主页信息

# 使用bs4提取数据
soup = BeautifulSoup(home_page, 'lxml')

script = soup.find(attrs={'id': 'getListByCountryTypeService2true'})
print(script)
